package top.lingchen.blogapi.vo;

/**
 * @Author 凌宸
 * @create 2021-12-16 下午 5:12
 * @Description
 * @Version 1.0
 */
public enum ErrorCode {
    PARAMS_ERROR(10001,"参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002,"用户名或密码不存在"),
    TOKEN_ILLEGAL(10003,"token 不合法"),
    ACCOUNT_EXIST(10004,"账户已存在"),
    FILE_UPLOAD_FAIL(20001,"文件上传失败"),
    NO_PERMISSION(70001,"无访问权限"),
    SESSION_TIME_OUT(90001,"会话超时"),
    NO_LOGIN(90002,"未登录"),
    SYSTEM_ERROR(-999, "系统错误");

    // 错误码
    private int code;
    // 错误信心
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
